The present disclosure relates to object storage technology, and more specifically, to a method and an apparatus for synchronizing an object in a local object storage node.
Currently, an object storage system is becoming more and more popular. The object storage system takes an object as a basic unit for storage, and each object is an integration of data and data attribute sets. Typically, the object is stored in an object storage device, and the object storage device is responsible for managing the local objects.
In a distributed object storage system, a plurality of object storage devices can synchronously store the same object, so that there are a plurality of multiple replicas of the object in the plurality of object storage devices.
However, if any object storage device of these object storage devices fails or a network fails, the replicas of the object might only exist in some object storage devices, rather than all the object storage devices. Therefore, it is necessary to repair such inconsistencies in which there is only a part of replicas.
In the prior art, a background replication solution is provided to discover and repair such inconsistencies in which there is only a part of replicas. For example, OpenStack Swift object storage system employs a replicator to perform this solution. In each replication cycle, the replicator retrieves names and timestamps of all the objects in each of the plurality of object storage devices which store multiple replicas of a specific object, finds discrepancies between the replicas of the object in the respective object storage devices by comparing the retrieved data, and further repair the found discrepancies. However, this solution poses high I/O overhead as it needs to scan (read) the file system for the name and timestamp of every object. In addition, if the number of the objects in the object storage device is huge, it would take a lot of time to complete the comparison for all the objects, and thus the performance of the replicator would become intolerable.